package cn.itsource.pethome.mapper;

import cn.itsource.pethome.domain.Department;
import cn.itsource.pethome.query.DepartmentQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepartmentMapper extends BaseMapper<Department, DepartmentQuery> {

    /**
     * 查询部门
     * @param findParent 1表示查询父级部门  2表示查询子部门
     * @return
     */
    List<Department> findAllParent(@Param("findParent") Integer findParent);


    /**
     * 通过部门名称查询部门
     * @param name
     * @return
     */
    Department findByName(@Param("name") String name, @Param("id")Long id);
}
